package org.codegallery.jpagal.service.impl;

import java.util.List;

import org.codegallery.jpagal.entity.Account;
import org.codegallery.jpagal.entity.Customer;
import org.codegallery.jpagal.repository.AccountRepository;
import org.codegallery.jpagal.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Transactional(readOnly = true)
class AccountServiceImpl implements AccountService {

 
  
  @Autowired
  private AccountRepository repository;


  @Transactional
  public Account save(Account account) {
	  repository.save(account);
	  return account;

  }


  public List<Account> findByCustomer(Customer customer) {
	  return repository.findByCustomer(customer);
  }


public void insertFoo(Account account) {
	// TODO Auto-generated method stub
	
}
}